import request from '@/utils/request'
/**
 * 获取广告列表
 */
export const getAdvertiseList = (params) => {
  return request({
    url: '/app/advertising',
    method: 'GET',
    params: params
  })
}

/**
 * 获取公告列表
 */
export const getAnnouncement = (params) => {
  return request({
    url: '/app/announcement',
    method: 'GET',
    params: params
  })
}

export const getzixun = (params) => {
  return request({
    url: '/app/news',
    method: 'GET',
    params: params
  })
}

// // 删除
// export const deleteAdvertise = (data) => {
//   return request({
//     url: '/app/advertising',
//     method: 'DELETE',
//     data
//   })
// }
// 查询
export const chaxun = (params) => {
  return request({
    url: '/app/advertising',
    method: 'get',
    params
  })
}
// 楼盘信息
export const loupanxin = (params) => {
  return request({
    url: '/base/communityName',
    method: 'get',
    params
  })
}
// 新增广告
export const addAdvertise = (data) => {
  return request({
    url: '/app/advertising',
    method: 'POST',
    data
  })
}
// 修改
export const updateAdvertise = (data) => {
  return request({
    url: '/app/advertising',
    method: 'PUT',
    data
  })
}
// 新增公告
export const addAnnouncement = (data) => {
  return request({
    url: '/app/announcement',
    method: 'POST',
    data
  })
}
